﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;

namespace NLBS.Entity
{
    /// <summary>
    /// 与日志相关的评论实体类
    /// </summary>
    public class Comment
    {
        private int _commentID;
        /// <summary>
        /// 评论编号
        /// </summary>
        [DataMember]
        public virtual int CommentID
        {
            get { return _commentID; }
            set { _commentID = value; }
        }

        private int _logID;
        /// <summary>
        /// 日志编号
        /// </summary>
        [DataMember]
        public virtual int LogID
        {
            get { return _logID; }
            set { _logID = value; }
        }

        private string _content;
        /// <summary>
        /// 评论内容
        /// </summary>
        [DataMember]
        public virtual string Content
        {
            get { return _content; }
            set { _content = value; }
        }

        private int _authorID;
        /// <summary>
        /// 评论者ID,匿名为0
        /// </summary>
        [DataMember]
        public virtual int AuthorID
        {
            get { return _authorID; }
            set { _authorID = value; }
        }

        private Article _article;
        /// <summary>
        /// 评论相关日志
        /// </summary>
        [DataMember]
        public virtual Article Article
        {
            get
            {
                if (_article == null)
                {
                    _article = new Article();
                }
                return _article;
            }
            set { _article = value; }
        }

        private string _author;
        /// <summary>
        /// 评论用户名
        /// </summary>
        [DataMember]
        public virtual string Author
        {
            get { return _author; }
            set { _author = value; }
        }

        private string _editMark;
        /// <summary>
        /// 编辑标签
        /// </summary>
        [DataMember]
        public virtual string EditMark
        {
            get { return _editMark; }
            set { _editMark = value; }
        }

        private DateTime _postTime;
        /// <summary>
        /// 发表时间
        /// </summary>
        [DataMember]
        public virtual DateTime PostTime
        {
            get { return _postTime; }
            set { _postTime = value; }
        }

        private bool _hidden;
        /// <summary>
        /// 是否隐藏
        /// </summary>
        [DataMember]
        public virtual bool Hidden
        {
            get { return _hidden; }
            set { _hidden = value; }
        }

        private string _ubbFlags;
        /// <summary>
        /// UBB标记
        /// </summary>
        [DataMember]
        public virtual string UbbFlags
        {
            get { return _ubbFlags; }
            set { _ubbFlags = value; }
        }

        private string _ip;
        /// <summary>
        /// 评论用户IP
        /// </summary>
        [DataMember]
        public virtual string IP
        {
            get { return _ip; }
            set { _ip = value; }
        }

    }
}
